A DeployableContainer implementation that can connect to a Remote Tomcat 6 Servlet Container.
Container Injection Support Matrix
@Resource
|
@EJB
|
@EJB (no-interface)
|
@Inject (CDI)
|
@Inject (MC)
|
@PersistenceContext @PersistenceUnit
|
|
|
|
|
|
|
CDI support requires use of Weld Servlet and associated configuration.
Configuration
Default Protocol: Servlet 2.5
Container Configuration Options
Name
|
Type
|
Default
|
Description
|
httpPort
|
int
|
8080
|
The HTTP port the server is bound to.
|
host
|
String
|
localhost
|
The host the server is running on.
|
user
|
String
|
|
The user to authenticate as when using the Management console
|
pass
|
String
|
|
The password to authenticate with when using the Management console
|
jmxPort
|
int
|
8089
|
The JMX port used to connect to the running instance, needed for deployment introspection
|
Example of Maven profile setup
<profile>
<id>tomcat-remote</id>
<dependencies>
<dependency>
<groupId>org.jboss.arquillian.container</groupId>
<artifactId>arquillian-tomcat-remote-6</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
The Remote Tomcat instance has to expose a remote JMX MBeanConnection. This can be done by adding the following to the startup script:
Linux example - startup.sh
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=8089 "
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false "
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
Note: This makes your Tomcat insecure; use only for development purposes. If you want to secure, see e.g. Chapter 10. Monitoring Enterprise Web Server with JBoss Operating Network in JBoss Enterprise Web Server 1.0 Installation Guide.